Loading
Scriptbox
 VBScript Links 
 About VBscript 
 JavaScript Links 
 About JavaScript 
 Powershell Links 
 PSCRIPT the Script Launcher 
 PowerShell Shortcut Keys 
 About Powershell 
     VBScript
    JavaScript
    Powershell
Disclaimer
Contact
Latest 10 Scripts
Script search
  :: { Category } :: 0-9ABCDEFGHIJKLMNOPQRSTUVWXYZ
         

Search Options:  List  Domain  Information  Using  WMI  

 Content of List Domain Information Using WMI.vbs
MD5 Hash: D0BF89E97AAEA7ECCD39614284C112CE
' Description: Retrieves information about domains discovered on the network.


On Error Resume Next

strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")

Set colItems = objWMIService.ExecQuery("Select * from Win32_NTDomain")

For Each objItem in colItems
Wscript.Echo "Client Site Name: " & objItem.ClientSiteName
Wscript.Echo "DC Site Name: " & objItem.DcSiteName
Wscript.Echo "Description: " & objItem.Description
Wscript.Echo "DNS Forest Name: " & objItem.DnsForestName
Wscript.Echo "Domain Controller Address: " & _
objItem.DomainControllerAddress
Wscript.Echo "Domain Controller Address Type: " & _
objItem.DomainControllerAddressType
Wscript.Echo "Domain Controller Name: " & objItem.DomainControllerName
Wscript.Echo "Domain GUID: " & objItem.DomainGuid
Wscript.Echo "Domain Name: " & objItem.DomainName
Wscript.Echo "DS Directory Service Flag: " & objItem.DSDirectoryServiceFlag
Wscript.Echo "DS DNS Controller Flag: " & objItem.DSDnsControllerFlag
Wscript.Echo "DS DNS Domain Flag: " & objItem.DSDnsDomainFlag
Wscript.Echo "DS DNS Forest Flag: " & objItem.DSDnsForestFlag
Wscript.Echo "DS Global Catalog Flag: " & objItem.DSGlobalCatalogFlag
Wscript.Echo "DS Kerberos Distribution Center Flag: " & _
objItem.DSKerberosDistributionCenterFlag
Wscript.Echo "DS Primary Domain Controller Flag: " & _
objItem.DSPrimaryDomainControllerFlag
Wscript.Echo "DS Time Service Flag: " & objItem.DSTimeServiceFlag
Wscript.Echo "DS Writable Flag: " & objItem.DSWritableFlag
Wscript.Echo "Name: " & objItem.Name
Wscript.Echo "Primary Owner Contact: " & objItem.PrimaryOwnerContact
Wscript.Echo
Next

   © 2008 - 2013 Boris Toll      :: Scripts available: 6.481 ::      :: scriptbox.toll.at ::      :: powered by www.toll.at ::
  Google Entries:n/a
  Yahoo Backlinks:n/a
  Live Backlinks:n/a
  del.icio.us Bookmarks:n/a
  Technorati Links:n/a